package com.demo.service;

import org.bson.Document;
import org.noear.solon.annotation.Inject;
import org.noear.solon.extend.aspect.annotation.Service;
import org.noear.weed.mongo.MgContext;

import java.util.List;

@Service
public class TestService {
    @Inject
    MgContext db;

    public List query1() {
        return db.table("Hindi-WY-mark-20210731")
                .whereEq("labelStatus", 5)
                .orderByDesc("qty")
                .limit(1000)
                .selectMapList();
    }

    public List query2() {
        return db.table("col_Vietnamese_20210425_1-mark-20210605")
                .whereEq("markerId", 6194)
//                .orderByDesc("qty")
                .limit(1000)
                .selectMapList();
    }

    public List query3() {
        List list =
//        return db.table("Hindi-WY-mark-20210731")
         db.table("col_Vietnamese_20210425_1-mark-20210605")
                .whereEq("markerId", 6194)
                .selectMapList();
//        System.out.println(list.size());
        return list;
    }
}
